const { sqlite3 } = require('../../mysql')

module.exports = async (ctx) => {
  console.log('获取首页数据');
  const banner = await sqlite3('banner').where('enabled', !0).select()
  const channel = await sqlite3('channel').select()

  ctx.body = {
    banner: banner,
    channel: channel
  }
}
